/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: DickYang
 * Date: 2023-06-16
 * Time: 10:36
 */
public class TestStringBuffer {
    public static void main(String[] args) {
        StringBuffer stringBuffer = new StringBuffer("hello");
        long start = System.currentTimeMillis();
        for (int i = 0; i < 10000; i++) {
            stringBuffer.append("word");
        }
        long end = System.currentTimeMillis();
        System.out.println(end - start);
    }
    public static void main1(String[] args) {
        StringBuffer stringBuffer = new StringBuffer("hello");
        stringBuffer.append("word").append(12);
        stringBuffer.append(10.89);
        System.out.println(stringBuffer.toString());
    }
}
